{include file="public/header"}
<link rel="stylesheet" type="text/css" href="__ADMIN__/css/reportForm.css">
</head>
<style>
    .info-card {
        padding: 10px;
    }

    .info-card p {
        font-size: 16px;
        margin-bottom: 10px
    }

    .info-card p span {
        font-size: 14px;
        color: #888;
        margin-left: 10px;
    }
</style>

<body>
    <div class="cBody">
        <div class="collectData">
            <div class="layui-row">
                <div class="layui-col-md3 br">
                    <div class="layui-col-md6">
                        <div class="title">订货单</div>
                        <div class="nums">
                            <font>1</font><span>笔</span>
                        </div>
                    </div>
                    <div class="layui-col-md6">
                        <div class="title">退货单</div>
                        <div class="nums">
                            <font>0</font><span>笔</span>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md3 br">
                    <div class="layui-col-md6">
                        <div class="title">订货客户数</div>
                        <div class="nums">
                            <font>1</font>
                        </div>
                    </div>
                    <div class="layui-col-md6">
                        <div class="title">退货客户数</div>
                        <div class="nums">
                            <font>1</font>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md2">
                    <div class="title">订货金额</div>
                    <div class="nums">
                        <font>115.20</font>
                    </div>
                </div>
                <div class="layui-col-md2">
                    <div class="title">退货金额</div>
                    <div class="nums">
                        <font>0.00</font>
                    </div>
                </div>
                <div class="layui-col-md2">
                    <div class="title">金额合计</div>
                    <div class="nums">
                        <font>115.20</font>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-row">
            <div class="layui-col-xs6">
                <div class="layui-card">
                    <div class="layui-card-header">系统信息</div>
                    <div class="layui-card-body">
                        <div class="info-card">
                            {foreach $info as $k=>$v}
                            <p>{$k}:<span>{$v}</span></p>
                            {/foreach}
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-col-xs6">
                <div class="layui-card">
                    <div class="layui-card-header">登录日记</div>
                    <div class="layui-card-body">
                        <table class="layui-table" id="demo" lay-filter="test"></table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
<script type="text/html" id="adminid">
     {{#  if(d.aid ==0){ }}
        <div>无</div>
     {{#  } else { }}
        <div>{{d.aid}}</div>
     {{#  } }}
</script>
<script type="text/html" id="role">
     {{#  if(d.role ==null){ }}
        <div>超级管理员</div>
     {{#  } else { }}
        <div>{{d.role}}</div>
     {{#  } }}
</script>
<script>
    layui.use(['table', 'layer', 'form'], function () {
        var table = layui.table;
        var layer = layui.layer;
        var form = layui.form;
        form.render();
        //第一个实例
        var datatable = table.render({
            elem: '#demo'
            , url: '{:url("Index/home")}' //数据接口
            , method: 'POST'
            , cols: [[ //表头
                { field: 'aid', title: '管理员ID', sort: true, templet: "#adminid" },
                { field: 'admin_user', title: '管理员名', sort: true },
                { field: 'role', title: '角色名称', sort: true, templet: "#role" },
                { field: 'log_time', title: '登录时间', sort: true, templet: '<div>{{ layui.laytpl.toDateString(d.last_login*1000) }}</div>' },
                { field: 'log_ip', title: '最后登录ip', sort: true },
                { field: 'remark', title: '备注', sort: true },
            ]]
            , page: true
        });
    });
</script>
{include file="public/footer"}